<template>
    <div>
        <p>输入姓名: <input type="text" v-model="name"> <button @click="login">上班打卡</button></p>
    </div>
</template>

<script>
    export default {
        name: "user_sector",
        data() {
            return {
                name: '',
            }
        },
        methods: {
            login(){
                this.$axios({
                    url: 'sector/user/',
                    method: 'POST',
                    data: {
                        name: this.name
                    }
                }).then(resp=>{
                    alert(resp.data.msg);
                    if (resp.data.code==200){
                        this.$router.push('/index_sector')
                    }
                })
            }
        },
        computed: {},
        filters: {},
        watch: {},
    }
</script>

<style scoped>

</style>
